<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>管理任务 | Elastic Crontab System</title>
    <meta name="description" content="一款简单易用的分布式定时任务管理系统">
    
    
    <link rel="preload" href="/ects/assets/css/0.styles.4b878e04.css" as="style"><link rel="preload" href="/ects/assets/js/app.dc03944a.js" as="script"><link rel="preload" href="/ects/assets/js/9.4a0eec1b.js" as="script"><link rel="prefetch" href="/ects/assets/js/10.a9b3e2ed.js"><link rel="prefetch" href="/ects/assets/js/11.8d62d449.js"><link rel="prefetch" href="/ects/assets/js/12.f9d3cea2.js"><link rel="prefetch" href="/ects/assets/js/13.de2731d4.js"><link rel="prefetch" href="/ects/assets/js/2.f8f0e8d9.js"><link rel="prefetch" href="/ects/assets/js/3.5a2a6f56.js"><link rel="prefetch" href="/ects/assets/js/4.fc5cf636.js"><link rel="prefetch" href="/ects/assets/js/5.3002656a.js"><link rel="prefetch" href="/ects/assets/js/6.fe2e5ce2.js"><link rel="prefetch" href="/ects/assets/js/7.fbbe362c.js"><link rel="prefetch" href="/ects/assets/js/8.50df79d7.js">
    <link rel="stylesheet" href="/ects/assets/css/0.styles.4b878e04.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/ects/" class="home-link router-link-active"><!----> <span class="site-name">Elastic Crontab System</span></a> <div class="links" style="max-width:nullpx;"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/ects/introduction/architecture.html" class="nav-link">项目介绍</a></div><div class="nav-item"><a href="/ects/developer/" class="nav-link">开发文档</a></div><div class="nav-item"><a href="https://github.com/betterde/ects/releases" target="_blank" rel="noopener noreferrer" class="nav-link external">
  下载
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><a href="https://github.com/betterde/ects" target="_blank" rel="noopener noreferrer" class="nav-link external">
  Github
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <div class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/ects/introduction/architecture.html" class="nav-link">项目介绍</a></div><div class="nav-item"><a href="/ects/developer/" class="nav-link">开发文档</a></div><div class="nav-item"><a href="https://github.com/betterde/ects/releases" target="_blank" rel="noopener noreferrer" class="nav-link external">
  下载
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><a href="https://github.com/betterde/ects" target="_blank" rel="noopener noreferrer" class="nav-link external">
  Github
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <!----></nav>  <ul class="sidebar-links"><li><a href="/ects/introduction/architecture.html" class="sidebar-link">架构设计</a></li><li><a href="/ects/introduction/dependencies.html" class="sidebar-link">环境依赖</a></li><li><a href="/ects/introduction/configuration.html" class="sidebar-link">服务配置</a></li><li><a href="/ects/introduction/services.html" class="sidebar-link">运行服务</a></li><li><a href="/ects/introduction/managerment.html" class="active sidebar-link">管理任务</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/ects/introduction/managerment.html#概念介绍" class="sidebar-link">概念介绍</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/ects/introduction/managerment.html#任务" class="sidebar-link">任务</a></li><li class="sidebar-sub-header"><a href="/ects/introduction/managerment.html#流水线" class="sidebar-link">流水线</a></li><li class="sidebar-sub-header"><a href="/ects/introduction/managerment.html#节点" class="sidebar-link">节点</a></li></ul></li><li class="sidebar-sub-header"><a href="/ects/introduction/managerment.html#创建任务" class="sidebar-link">创建任务</a></li><li class="sidebar-sub-header"><a href="/ects/introduction/managerment.html#创建流水线" class="sidebar-link">创建流水线</a></li><li class="sidebar-sub-header"><a href="/ects/introduction/managerment.html#绑定节点" class="sidebar-link">绑定节点</a></li><li class="sidebar-sub-header"><a href="/ects/introduction/managerment.html#用户管理" class="sidebar-link">用户管理</a></li><li class="sidebar-sub-header"><a href="/ects/introduction/managerment.html#日志查询" class="sidebar-link">日志查询</a></li></ul></li><li><a href="/ects/introduction/more.html" class="sidebar-link">更多</a></li></ul> </div> <div class="page"> <div class="content"><h1 id="管理任务"><a href="#管理任务" aria-hidden="true" class="header-anchor">#</a> 管理任务</h1> <h2 id="概念介绍"><a href="#概念介绍" aria-hidden="true" class="header-anchor">#</a> 概念介绍</h2> <h3 id="任务"><a href="#任务" aria-hidden="true" class="header-anchor">#</a> 任务</h3> <p>在 ECST 中，任务是可以公用的，只需要定义任务模式和内容就可以了。</p> <h3 id="流水线"><a href="#流水线" aria-hidden="true" class="header-anchor">#</a> 流水线</h3> <p>流水线在系统中是最小的调度单位，一个流水线可以在多台 Worker 节点上调度。要想运行流水线，你需要为流水线添加需要执行的任务。流水线中至少包含一个任务，否者无法同步到 ETCD 也就无法被调度。如果你添加了多个任务，则可以自定义执行顺序。你还可以为流水线设置<code>完成时</code>和<code>失败时</code>执行的任务。可以用来发送<code>邮件通知</code>、<code>Hook</code>或<code>HTTP请求</code>。</p> <h3 id="节点"><a href="#节点" aria-hidden="true" class="header-anchor">#</a> 节点</h3> <p>节点的添加方式有两种，一种是在远端直接运行未提供 <code>--node</code> 参数的命令，另一种方式是在后台创建，然后获取节点 ID，然后在远端运行时，提供 <code>--node</code> 参数。当为流水线添加了任务后，你还需要将流水线绑定到需要运行的节点上，这样才能被节点调度。</p> <h2 id="创建任务"><a href="#创建任务" aria-hidden="true" class="header-anchor">#</a> 创建任务</h2> <p><img src="/ects/task/create_task.png" alt="Task List"></p> <p><img src="/ects/task/list.png" alt="Task"></p> <h2 id="创建流水线"><a href="#创建流水线" aria-hidden="true" class="header-anchor">#</a> 创建流水线</h2> <p><img src="/ects/pipeline/create_pipeline.png" alt="Task List"></p> <p><img src="/ects/pipeline/list.png" alt="Task"></p> <h2 id="绑定节点"><a href="#绑定节点" aria-hidden="true" class="header-anchor">#</a> 绑定节点</h2> <p><img src="/ects/pipeline/bind_node.png" alt="Task List"></p> <p><img src="/ects/pipeline/node.png" alt="Task"></p> <div class="tip custom-block"><p class="custom-block-title">注意</p> <p>只有 Worker 节点才能绑定流水线</p></div> <h2 id="用户管理"><a href="#用户管理" aria-hidden="true" class="header-anchor">#</a> 用户管理</h2> <p><img src="/ects/user.png" alt="User"></p> <h2 id="日志查询"><a href="#日志查询" aria-hidden="true" class="header-anchor">#</a> 日志查询</h2> <p><img src="/ects/log.png" alt="Log"></p></div> <div class="page-edit"><!----> <!----></div> <div class="page-nav"><p class="inner"><span class="prev">
        ←
        <a href="/ects/introduction/services.html" class="prev">
          运行服务
        </a></span> <span class="next"><a href="/ects/introduction/more.html">
          更多
        </a>
        →
      </span></p></div> </div> <!----></div></div>
    <script src="/ects/assets/js/app.dc03944a.js" defer></script><script src="/ects/assets/js/9.4a0eec1b.js" defer></script>
  </body>
</html>
